/* __V3D_TEMPLATE__ - template-based file; delete this line to prevent this file from being updated */

/* Stripe/Notion style typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --color-text-primary: #1a1a1a;
    --color-text-secondary: #6b7280;
    --color-text-tertiary: #9ca3af;
}

body {
    margin: 0px;
    overflow: hidden;
    display: flex;
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#v3d-container {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    height: 100vh;
}

.fullscreen-button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    background-size: 100% 100%;
    display: none;
    z-index: 1;
}

.fullscreen-open {
    background-image: url('media/fullscreen_open.svg');
}

.fullscreen-close {
    background-image: url('media/fullscreen_close.svg');
}

/* removes tap blinking on ios devices */
* { -webkit-tap-highlight-color:rgba(0,0,0,0); }

/* Mint UI style parity: swatches, preloader, and mobile tweaks */
/* Side panel positioning */
.mint-ui-panel {
    position: relative;
    flex: 0 0 335px;
    width: 335px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px 20px 10px;
    box-sizing: border-box;
    background: #ffffff;
    overflow-y: auto;
    font-family: var(--font-family);
}

.mint-ui-panel.right {
    /* Side by side layout - panel stays fixed width, 3D canvas fills remaining space */
}

.mint-card {
    border-radius: 12px;
    box-shadow: 0 18px 35px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
}

.mint-ui-header { margin-bottom: 16px; }
.mint-ui-header .brand { 
    font-family: var(--font-family);
    font-weight: 500; 
    font-size: 11px; 
    letter-spacing: 0.06em; 
    color: var(--color-text-tertiary); 
    text-transform: uppercase; 
    margin-bottom: 2px;
}
.mint-ui-header .product { 
    font-family: var(--font-family);
    font-weight: 600; 
    font-size: 22px; 
    letter-spacing: -0.02em; 
    color: var(--color-text-primary); 
    line-height: 1.3;
}

.mint-ui-section { display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; overflow: auto; }
.mint-ui-section details + details { margin-top: 2px; }

.mint-section-label { 
    font-family: var(--font-family);
    font-size: 12px; 
    font-weight: 500; 
    letter-spacing: 0.01em;
    color: var(--color-text-secondary); 
    margin: 12px 0 8px; 
}

.mint-dropdown { position: relative; display: block; padding: 12px 36px 12px 14px; border: 1px solid #e5e5e5; border-radius: 10px; background: #ffffff; cursor: pointer; transition: border-color 0.15s ease; }
.mint-dropdown:hover { border-color: #d1d5db; }
.mint-dropdown .title { 
    font-family: var(--font-family);
    font-weight: 500; 
    font-size: 14px; 
    letter-spacing: -0.01em;
    color: var(--color-text-primary); 
}
.mint-dropdown .selected { 
    font-family: var(--font-family);
    font-size: 12px; 
    font-weight: 400;
    color: var(--color-text-secondary); 
    margin-top: 2px;
}
.mint-dropdown::after { content: ""; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 8px; height: 8px; border-right: 1.5px solid #6b7280; border-bottom: 1.5px solid #6b7280; transform: translateY(-60%) rotate(45deg); transition: transform 0.2s ease; }
details[open] > .mint-dropdown::after { transform: translateY(-40%) rotate(-135deg); }

.mint-ui-panel .swatch-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 0 2px;
}

.mint-ui-panel .swatch {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 8px 14px;
    background: #ffffff;
    color: var(--color-text-primary);
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mint-ui-panel .swatch:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.mint-ui-panel .swatch.active,
.mint-ui-panel .swatch[aria-pressed="true"] {
    background: #0a0a0a;
    color: #ffffff;
    border-color: #0a0a0a;
    outline: none;
}

.mint-ui-panel .swatch.active:hover,
.mint-ui-panel .swatch[aria-pressed="true"]:hover {
    background: #171717;
    border-color: #171717;
}

.mint-ui-panel .swatch:focus {
    outline: none;
}

.mint-ui-panel .swatch:focus-visible {
    outline: 2px solid #0a0a0a;
    outline-offset: 2px;
}

.mint-footer { margin-top: auto; padding-top: 16px; }
.mint-cta { 
    width: 100%; 
    border: none; 
    border-radius: 8px; 
    background: #0a0a0a; 
    color: #fff; 
    padding: 12px 16px; 
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500; 
    letter-spacing: -0.01em;
    cursor: pointer; 
    transition: background 0.15s ease, transform 0.1s ease;
}
.mint-cta:hover { background: #171717; }
.mint-cta:active { transform: scale(0.98); }

/* Swatch dropdown styles */
.swatch-wrapper summary::-webkit-details-marker { display: none; }
.swatch-wrapper summary { list-style: none; }

/* Tablet (iPad) breakpoint: 601px - 1024px */
@media (min-width: 601px) and (max-width: 1024px) {
    body {
        flex-direction: row;
    }
    
    #v3d-container {
        flex: 1 1 auto;
        width: auto;
        height: 100vh;
    }
    
    .mint-ui-panel {
        flex: 0 0 280px;
        width: 280px;
        height: 100vh;
        padding: 20px 16px;
        border-radius: 0;
        border-left: 1px solid #e5e5e5;
        box-shadow: none;
    }
    
    .mint-card {
        border-radius: 0;
        box-shadow: none;
        border: none;
        border-left: 1px solid #e5e5e5;
    }
    
    .mint-ui-header { margin-bottom: 14px; }
    .mint-ui-header .brand { font-size: 10px; }
    .mint-ui-header .product { font-size: 20px; }
    
    .mint-section-label { 
        font-size: 11px; 
        margin: 10px 0 6px;
    }
    
    .mint-dropdown { 
        padding: 10px 32px 10px 12px; 
        border-radius: 8px;
    }
    .mint-dropdown .title { font-size: 13px; }
    .mint-dropdown .selected { font-size: 11px; }
    .mint-dropdown::after { right: 12px; width: 7px; height: 7px; }
    
    .mint-ui-panel .swatch-options {
        gap: 6px;
        padding: 4px 0 2px;
    }
    
    .mint-ui-panel .swatch {
        padding: 10px 14px;
        font-size: 12px;
        border-radius: 6px;
        /* Larger touch targets for tablet */
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mint-footer { padding-top: 12px; }
    .mint-cta { 
        padding: 14px 16px;
        font-size: 14px;
        border-radius: 8px;
        /* Minimum touch target for tablets */
        min-height: 48px;
    }
}

/* iPad Pro landscape and larger tablets */
@media (min-width: 1025px) and (max-width: 1366px) {
    .mint-ui-panel {
        flex: 0 0 300px;
        width: 300px;
    }
}

/* Mobile enhancements */
@media (max-width: 600px) {
    body {
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }
    
    #v3d-container {
        flex: 1 1 70%;
        width: 100%;
        height: 70vh !important;
        min-height: 0;
    }
    
    .mint-ui-panel {
        flex: 0 0 30%;
        width: 100%;
        height: 30vh !important;
        max-height: none;
        padding: 16px 16px 4px;
        background: #ffffff;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
        border: none;
        overflow-y: auto;
    }
    
    .mint-ui-panel.right {
        /* Mobile view - no additional positioning needed */
    }
    
    .mint-card {
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
        border: none;
    }
    
    /* Compact header - inline layout */
    .mint-ui-header { 
        margin-bottom: 12px;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    .mint-ui-header .brand { 
        font-size: 10px;
        margin-bottom: 0;
    }
    .mint-ui-header .product { 
        font-size: 18px;
        line-height: 1.2;
    }
    
    .mint-section-label { 
        font-size: 11px;
        margin: 8px 0 6px;
    }

    .swatch-wrapper {
        width: 100%;
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    /* Compact dropdown */
    .swatch-wrapper summary { display: block; padding: 0; }
    .mint-dropdown { 
        padding: 14px 40px 14px 16px; 
        margin: 4px 0;
        line-height: 1.35; 
        white-space: normal;
        border-radius: 10px;
    }
    .mint-dropdown .title { 
        font-size: 13px;
        white-space: normal; 
    }
    .mint-dropdown .selected { 
        font-size: 11px;
        white-space: normal;
        margin-top: 1px;
    }
    .mint-dropdown::after { right: 12px; top: 16px; transform: rotate(45deg); width: 7px; height: 7px; }
    details[open] > .mint-dropdown::after { transform: rotate(-135deg); top: 20px; }

    .mint-ui-section { 
        gap: 4px;
        flex: 0 0 auto;
        overflow: visible;
    }
    
    .mint-ui-section details + details {
        margin-top: 6px;
    }
    
    /* Horizontal swatches to save vertical space */
    .mint-ui-panel .swatch-options { 
        gap: 8px; 
        padding: 8px 0 4px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .mint-ui-panel .swatch { 
        padding: 10px 16px; 
        border-radius: 6px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Compact footer */
    .mint-footer { 
        padding-top: 4px;
        margin-top: 0;
    }
    .mint-cta { 
        padding: 14px 16px;
        font-size: 14px;
        border-radius: 10px;
        min-height: 48px;
    }
}

/* Mobile landscape - side panel layout */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    body {
        flex-direction: row;
        height: 100vh;
    }
    
    #v3d-container {
        flex: 1 1 auto;
        width: auto;
        height: 100vh !important;
        min-height: unset;
    }
    
    .mint-ui-panel {
        flex: 0 0 260px;
        width: 260px;
        height: 100vh !important;
        max-height: none;
        padding: 12px 14px 16px;
        border-radius: 0;
        box-shadow: none;
        border-left: 1px solid #e5e5e5;
    }
    
    .mint-card {
        border-radius: 0;
        box-shadow: none;
        border: none;
        border-left: 1px solid #e5e5e5;
    }
    
    .mint-ui-header { margin-bottom: 10px; }
    .mint-ui-header .brand { font-size: 9px; }
    .mint-ui-header .product { font-size: 16px; }
    
    .mint-section-label { 
        font-size: 10px;
        margin: 6px 0 4px;
    }
    
    .mint-dropdown { padding: 8px 30px 8px 10px; border-radius: 6px; }
    .mint-dropdown .title { font-size: 12px; }
    .mint-dropdown .selected { font-size: 10px; }
    
    .mint-ui-panel .swatch-options { 
        gap: 6px; 
        padding: 6px 0 2px;
        flex-wrap: wrap;
    }
    .mint-ui-panel .swatch { 
        padding: 8px 12px;
        font-size: 11px;
        min-height: 36px;
    }
    
    .mint-footer { padding-top: 8px; margin-top: auto; }
    .mint-cta { 
        padding: 10px 12px;
        font-size: 13px;
        min-height: 40px;
    }
}

/* Preloader visuals to match Mint */
.v3d-simple-preloader-logo {
    background-image: url('media/logo.jpg');
}

.v3d-simple-preloader-container {
    --v3d-preloader-img-width: 200px;
    --v3d-preloader-img-height: 75px;
}

.v3d-simple-preloader-bar {
    background: #000000;
    height: 3px;
    border-color: #2b70c7;
}
